Optimal. Leaf size=121 \[ -\frac {a \left (a^2+4 b^2\right ) \cos (e+f x)}{2 f}-\frac {b \left (2 a^2+3 b^2\right ) \sin (e+f x) \cos (e+f x)}{8 f}+\frac {3}{8} b x \left (4 a^2+b^2\right )-\frac {\cos (e+f x) (a+b \sin (e+f x))^3}{4 f}-\frac {a \cos (e+f x) (a+b \sin (e+f x))^2}{4 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2753, 2734} \[ -\frac {a \left (a^2+4 b^2\right ) \cos (e+f x)}{2 f}-\frac {b \left (2 a^2+3 b^2\right ) \sin (e+f x) \cos (e+f x)}{8 f}+\frac {3}{8} b x \left (4 a^2+b^2\right )-\frac {\cos (e+f x) (a+b \sin (e+f x))^3}{4 f}-\frac {a \cos (e+f x) (a+b \sin (e+f x))^2}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2734
Rule 2753
Rubi steps
\begin {align*} \int \sin (e+f x) (a+b \sin (e+f x))^3 \, dx &=-\frac {\cos (e+f x) (a+b \sin (e+f x))^3}{4 f}+\frac {1}{4} \int (3 b+3 a \sin (e+f x)) (a+b \sin (e+f x))^2 \, dx\\ &=-\frac {a \cos (e+f x) (a+b \sin (e+f x))^2}{4 f}-\frac {\cos (e+f x) (a+b \sin (e+f x))^3}{4 f}+\frac {1}{12} \int (a+b \sin (e+f x)) \left (15 a b+3 \left (2 a^2+3 b^2\right ) \sin (e+f x)\right ) \, dx\\ &=\frac {3}{8} b \left (4 a^2+b^2\right ) x-\frac {a \left (a^2+4 b^2\right ) \cos (e+f x)}{2 f}-\frac {b \left (2 a^2+3 b^2\right ) \cos (e+f x) \sin (e+f x)}{8 f}-\frac {a \cos (e+f x) (a+b \sin (e+f x))^2}{4 f}-\frac {\cos (e+f x) (a+b \sin (e+f x))^3}{4 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.35, size = 100, normalized size = 0.83 \[ \frac {b \left (-8 \left (3 a^2+b^2\right ) \sin (2 (e+f x))+48 a^2 e+48 a^2 f x+8 a b \cos (3 (e+f x))+b^2 \sin (4 (e+f x))+12 b^2 e+12 b^2 f x\right )-8 a \left (4 a^2+9 b^2\right ) \cos (e+f x)}{32 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.52, size = 93, normalized size = 0.77 \[ \frac {8 \, a b^{2} \cos \left (f x + e\right )^{3} + 3 \, {\left (4 \, a^{2} b + b^{3}\right )} f x - 8 \, {\left (a^{3} + 3 \, a b^{2}\right )} \cos \left (f x + e\right ) + {\left (2 \, b^{3} \cos \left (f x + e\right )^{3} - {\left (12 \, a^{2} b + 5 \, b^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{8 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.39, size = 116, normalized size = 0.96 \[ \frac {a b^{2} \cos \left (3 \, f x + 3 \, e\right )}{4 \, f} - \frac {3 \, a b^{2} \cos \left (f x + e\right )}{4 \, f} + \frac {b^{3} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {3}{8} \, {\left (4 \, a^{2} b + b^{3}\right )} x - \frac {{\left (2 \, a^{3} + 3 \, a b^{2}\right )} \cos \left (f x + e\right )}{2 \, f} - \frac {{\left (3 \, a^{2} b + b^{3}\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.23, size = 104, normalized size = 0.86 \[ \frac {b^{3} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-a \,b^{2} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )+3 a^{2} b \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-a^{3} \cos \left (f x +e \right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.51, size = 97, normalized size = 0.80 \[ \frac {24 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} b + 32 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a b^{2} + {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} b^{3} - 32 \, a^{3} \cos \left (f x + e\right )}{32 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.08, size = 313, normalized size = 2.59 \[ \frac {3\,b\,\mathrm {atan}\left (\frac {3\,b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (4\,a^2+b^2\right )}{4\,\left (3\,a^2\,b+\frac {3\,b^3}{4}\right )}\right )\,\left (4\,a^2+b^2\right )}{4\,f}-\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (3\,a^2\,b+\frac {3\,b^3}{4}\right )+2\,a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+4\,a\,b^2+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (6\,a^3+12\,a\,b^2\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (6\,a^3+16\,a\,b^2\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7\,\left (3\,a^2\,b+\frac {3\,b^3}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (3\,a^2\,b+\frac {11\,b^3}{4}\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,\left (3\,a^2\,b+\frac {11\,b^3}{4}\right )+2\,a^3}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}-\frac {3\,b\,\left (4\,a^2+b^2\right )\,\left (\mathrm {atan}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )-\frac {f\,x}{2}\right )}{4\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.66, size = 233, normalized size = 1.93 \[ \begin {cases} - \frac {a^{3} \cos {\left (e + f x \right )}}{f} + \frac {3 a^{2} b x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {3 a^{2} b x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {3 a^{2} b \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {3 a b^{2} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {2 a b^{2} \cos ^{3}{\left (e + f x \right )}}{f} + \frac {3 b^{3} x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {3 b^{3} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + \frac {3 b^{3} x \cos ^{4}{\left (e + f x \right )}}{8} - \frac {5 b^{3} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {3 b^{3} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} & \text {for}\: f \neq 0 \\x \left (a + b \sin {\relax (e )}\right )^{3} \sin {\relax (e )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________